Optimal. Leaf size=49 \[ \frac {(a+b)^2 \cosh (c+d x)}{d}+\frac {2 b (a+b) \text {sech}(c+d x)}{d}-\frac {b^2 \text {sech}^3(c+d x)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {3745, 276}
\begin {gather*} \frac {(a+b)^2 \cosh (c+d x)}{d}+\frac {2 b (a+b) \text {sech}(c+d x)}{d}-\frac {b^2 \text {sech}^3(c+d x)}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 276
Rule 3745
Rubi steps
\begin {align*} \int \sinh (c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=-\frac {\text {Subst}\left (\int \frac {\left (a+b-b x^2\right )^2}{x^2} \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (-2 b (a+b)+\frac {(a+b)^2}{x^2}+b^2 x^2\right ) \, dx,x,\text {sech}(c+d x)\right )}{d}\\ &=\frac {(a+b)^2 \cosh (c+d x)}{d}+\frac {2 b (a+b) \text {sech}(c+d x)}{d}-\frac {b^2 \text {sech}^3(c+d x)}{3 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.25, size = 46, normalized size = 0.94 \begin {gather*} \frac {3 (a+b)^2 \cosh (c+d x)+b \text {sech}(c+d x) \left (6 (a+b)-b \text {sech}^2(c+d x)\right )}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(97\) vs.
\(2(47)=94\).
time = 1.39, size = 98, normalized size = 2.00
method | result | size |
derivativedivides | \(\frac {a^{2} \cosh \left (d x +c \right )+2 a b \left (\frac {\sinh ^{2}\left (d x +c \right )}{\cosh \left (d x +c \right )}+\frac {2}{\cosh \left (d x +c \right )}\right )+b^{2} \left (\frac {\sinh ^{4}\left (d x +c \right )}{\cosh \left (d x +c \right )^{3}}+\frac {4 \left (\sinh ^{2}\left (d x +c \right )\right )}{\cosh \left (d x +c \right )^{3}}+\frac {8}{3 \cosh \left (d x +c \right )^{3}}\right )}{d}\) | \(98\) |
default | \(\frac {a^{2} \cosh \left (d x +c \right )+2 a b \left (\frac {\sinh ^{2}\left (d x +c \right )}{\cosh \left (d x +c \right )}+\frac {2}{\cosh \left (d x +c \right )}\right )+b^{2} \left (\frac {\sinh ^{4}\left (d x +c \right )}{\cosh \left (d x +c \right )^{3}}+\frac {4 \left (\sinh ^{2}\left (d x +c \right )\right )}{\cosh \left (d x +c \right )^{3}}+\frac {8}{3 \cosh \left (d x +c \right )^{3}}\right )}{d}\) | \(98\) |
risch | \(\frac {{\mathrm e}^{d x +c} a^{2}}{2 d}+\frac {a b \,{\mathrm e}^{d x +c}}{d}+\frac {{\mathrm e}^{d x +c} b^{2}}{2 d}+\frac {{\mathrm e}^{-d x -c} a^{2}}{2 d}+\frac {{\mathrm e}^{-d x -c} a b}{d}+\frac {{\mathrm e}^{-d x -c} b^{2}}{2 d}+\frac {4 b \,{\mathrm e}^{d x +c} \left (3 a \,{\mathrm e}^{4 d x +4 c}+3 b \,{\mathrm e}^{4 d x +4 c}+6 a \,{\mathrm e}^{2 d x +2 c}+4 b \,{\mathrm e}^{2 d x +2 c}+3 a +3 b \right )}{3 d \left (1+{\mathrm e}^{2 d x +2 c}\right )^{3}}\) | \(171\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 171 vs.
\(2 (47) = 94\).
time = 0.27, size = 171, normalized size = 3.49 \begin {gather*} \frac {1}{6} \, b^{2} {\left (\frac {3 \, e^{\left (-d x - c\right )}}{d} + \frac {33 \, e^{\left (-2 \, d x - 2 \, c\right )} + 41 \, e^{\left (-4 \, d x - 4 \, c\right )} + 27 \, e^{\left (-6 \, d x - 6 \, c\right )} + 3}{d {\left (e^{\left (-d x - c\right )} + 3 \, e^{\left (-3 \, d x - 3 \, c\right )} + 3 \, e^{\left (-5 \, d x - 5 \, c\right )} + e^{\left (-7 \, d x - 7 \, c\right )}\right )}}\right )} + a b {\left (\frac {e^{\left (-d x - c\right )}}{d} + \frac {5 \, e^{\left (-2 \, d x - 2 \, c\right )} + 1}{d {\left (e^{\left (-d x - c\right )} + e^{\left (-3 \, d x - 3 \, c\right )}\right )}}\right )} + \frac {a^{2} \cosh \left (d x + c\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 167 vs.
\(2 (47) = 94\).
time = 0.33, size = 167, normalized size = 3.41 \begin {gather*} \frac {3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{4} + 3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \sinh \left (d x + c\right )^{4} + 12 \, {\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \cosh \left (d x + c\right )^{2} + 6 \, {\left (3 \, {\left (a^{2} + 2 \, a b + b^{2}\right )} \cosh \left (d x + c\right )^{2} + 2 \, a^{2} + 8 \, a b + 6 \, b^{2}\right )} \sinh \left (d x + c\right )^{2} + 9 \, a^{2} + 42 \, a b + 25 \, b^{2}}{6 \, {\left (d \cosh \left (d x + c\right )^{3} + 3 \, d \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} + 3 \, d \cosh \left (d x + c\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \sinh {\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 139 vs.
\(2 (47) = 94\).
time = 0.46, size = 139, normalized size = 2.84 \begin {gather*} \frac {3 \, a^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} + 6 \, a b {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )} + \frac {8 \, {\left (3 \, a b {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} + 3 \, b^{2} {\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{2} - 2 \, b^{2}\right )}}{{\left (e^{\left (d x + c\right )} + e^{\left (-d x - c\right )}\right )}^{3}}}{6 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.19, size = 154, normalized size = 3.14 \begin {gather*} \frac {{\mathrm {e}}^{c+d\,x}\,{\left (a+b\right )}^2}{2\,d}+\frac {{\mathrm {e}}^{-c-d\,x}\,{\left (a+b\right )}^2}{2\,d}+\frac {8\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,{\mathrm {e}}^{c+d\,x}\,\left (b^2+a\,b\right )}{d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}-\frac {8\,b^2\,{\mathrm {e}}^{c+d\,x}}{3\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________